'use client'
import { ConfigProvider } from 'antd';
import theme from './theme/themeConfig';
import { useRouter,usePathname } from 'next/navigation'
import { useEffect } from 'react';





 function Home() {
	 const pathsname = usePathname();
	 const router = useRouter()
	 const checkLogin = ()=>{		
	 	let pmd:any = (window as any).islogin
	 	if(pmd!=='1'){
	 		pmd = sessionStorage.getItem('islogin') 		
	 		if(!pmd){			
	 			if(pathsname!=='/login'){
	 				router.push('/login')		
	 			} 			
	 			}else if(pathsname==='/login'){
	 				router.push('/order')
	 			}
	 	}
	return
}
useEffect(()=>{
	checkLogin()
})
  return <>
	
  </>
}
export default Home